<?php

class ElementosSenializacione extends AppModel {

    var $name = 'ElementosSenializacione';
    var $displayField = 'id';
    var $validate = array(
        'id' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
        'fecha_actualizacion' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
        ),
        'menues_senializacione_id' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
        'estado_id' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
        'obra_id' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Campo requerido',
            ),
            'numeric' => array(
                'rule' => array('numeric'),
                'message' => 'Campo inválido',
            ),
        ),
        'descripcion' => array(
            'maxlength' => array(
                'rule' => array('maxlength', 100),
                'message' => 'La longitud máxima de la descripción es 100 caracteres.',
                'last' => true,
            ),
        ),
    );
    //The Associations below have been created with all possible keys, those that are not needed can be removed
    var $belongsTo = array(
        'MenuesSenializacione' => array(
            'className' => 'MenuesSenializacione',
            'foreignKey' => 'menues_senializacione_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'Estado' => array(
            'className' => 'Estado',
            'foreignKey' => 'estado_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'Obra' => array(
            'className' => 'Obra',
            'foreignKey' => 'obra_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );
}
?>